package com.mzba.zxdlyllp;

import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.actionbarsherlock.app.SherlockFragment;
import com.mzba.zxdlyllp.db.MasturbationTable;
/**
 * 
 * @author 06peng
 *
 */
public class MasturbationFragmentItem extends SherlockFragment {
	
	private String content;
	
	public MasturbationFragmentItem(String title) {
		try {
			MasturbationTable mt = new MasturbationTable(getSherlockActivity());
			content = new String(mt.get(title).getContent());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.masurbation_fragment, null);
		TextView tv = (TextView) view.findViewById(R.id.bunch_of_text);
		tv.setTextSize(16.0f);
		tv.setPadding(0, 2, 0, 3);
		tv.setText(Html.fromHtml(content));
		return view;
	}
	
}
